# 原始数据
raw_users = [
    "  john DOE  ",
    "ALICE SMITH  ",
    "  bob wilson",
    "Mary-Jane O'Conner"
]


cleaned_users_v2 = [
    user.strip().upper().replace(' ', '_').replace('-','_')
    for user in raw_users
]

print("\n列表推导式版本:")
for user in cleaned_users_v2:
    print(f"  - {user}")